<template>
  <view class="index" id="index">
    <view class="mapBox">
      <map 
        id="map"
        style="width: 100%;height: 85%;"
        :longitude="longitude"
        :latitude="latitude"
        scale="10"
        :markers="markers"
        :polyline="polyline"
        :show-location="true"
        @regionchange="regionchange"
        @markertap="markertap"
      >
      </map>
      <view class="tabBar">
        <view class="tabItem">
            个人中心
        </view>
        <view class="tabItem">
            我的订单
        </view>
        <view class="tabItem">
            联系客服
        </view>
      </view>
    </view>
    <view class="scanCode">扫码取杖</view>
  </view>
</template>

<script setup>
import { ref } from 'vue'
import Taro from '@tarojs/taro'
import './index.less'
import { View } from '@tarojs/components';
Taro.setNavigationBarColor({
    frontColor: '#000000',
    backgroundColor: '#C0EDED',
    animation: {
        duration: 400,
        timingFunc: 'easeIn'
    }
})
// 获取用户授权
Taro.getFuzzyLocation({
  type: 'wgs84', 
  complete: (c) => {
    console.log(c)
  },
  fail: (f) => {
    console.log(f)
  },
  success: (s) => {
    console.log(s)
  }
})

let markers = ref([])
let polyline = ref([])
</script>
